package com.ekang.admin.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by zcz on 2017/11/6.
 */
@Configuration
public class WebAppConfigurer extends WebMvcConfigurerAdapter {


    @Bean(name = "wechatConfig")
    public WechatConfig wechatConfig() {
        return new WechatConfig();
    }


    @Bean(name = "paySetting")
    public PaySetting paySetting() {
        return new PaySetting();
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry
//                .addInterceptor(new SecurityInterceptor())
//                .addPathPatterns("/**")
//                .excludePathPatterns("/login.html", "/index.html", "/doLogin.do", "/doLogout.do", "/error");

        super.addInterceptors(registry);
    }
}
